Function at 0x420d99
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x5025d0]
xor eax, esp
mov dword [esp + 0x268], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [esp + 8], eax
push esi
push edi
xor eax, eax
mov byte [esp + 0x48], 0
lea edi, [esp + 0x49]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov esi, 0x103
push esi
stosb byte es:[edi], al
lea eax, [esp + 0x65]
mov ebx, ecx
push 0
push eax
mov dword [esp + 0x20], ebx
mov byte [esp + 0x6c], 0
call fcn.004a8c80
add esp, 0xc
push esi
lea eax, [esp + 0x16d]
push 0
push eax
mov byte [esp + 0x174], 0
call fcn.004a8c80
xor eax, eax
mov byte [esp + 0x24], 0
lea edi, [esp + 0x25]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
stosb byte es:[edi], al
call fcn.004bbf64
test eax, eax
je 0x420e55
lea eax, [esp + 0x168]
call fcn.00477999
mov ecx, dword [esp + 0x10]
push 0x104
lea edx, [esp + 0x64]
call fcn.004429a5
test ebx, ebx
pop ecx
je 0x4214de
lea eax, [esp + 0x60]
push eax
push ebx
jmp 0x4214d7
mov edx, dword [esp + 0x10]
call fcn.00477a16
test eax, eax
je 0x420e7d
call fcn.0043e019
mov edx, eax
mov dword [esp + 0x10], edx
call fcn.00477a16
test eax, eax
je 0x420e7d
xor eax, eax
jmp 0x4214f5
mov ecx, dword [esp + 0x10]
mov edi, 0x104
push edi
lea edx, [esp + 0x64]
call fcn.004429a5
test eax, eax
pop ecx
jne 0x420e9e
lea eax, [esp + 0x60]
call fcn.00477999
lea esi, [esp + 0x60]
call fcn.004783f1
call fcn.0043dee8
mov ebx, eax
lea eax, [esp + 0x18]
call fcn.00477999
cmp ebx, 0x64
jl 0x420e76
push ebx
lea eax, [esp + 0x4c]
call fcn.0043bf16
pop ecx
call fcn.0040fb59
test eax, eax
je 0x420f80
xor eax, eax
mov byte [esp + 0x30], 0
lea edi, [esp + 0x31]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x3c], 0
lea edi, [esp + 0x3d]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x48]
push eax
push 0xc
pop ecx
lea eax, [esp + 0x34]
call fcn.00477a48
pop ecx
lea eax, [esp + 0x33]
push eax
push 0xc
pop ecx
lea eax, [esp + 0x40]
call fcn.00477a48
pop ecx
lea eax, [esp + 0x18]
mov byte [esp + 0x33], 0
mov byte [esp + 0x3f], 0
call fcn.00477999
push dword [esp + 0x10]
call fcn.004506b0
pop ecx
mov esi, eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x34]
push eax
push str.SELECT_ALPHA_DC_CODE_FROM_DISTRIBUTION_CENTER_WHERE_DIVISION_CODE_s_AND_DC_CODE_s
push esi
call fcn.0044f89d
add esp, 0x10
test eax, eax
je 0x420f74
push 1
push 0
push 0x15
lea eax, [esp + 0x24]
push eax
push esi
call fcn.0044f988
add esp, 0x14
test eax, eax
jne 0x420f74
lea eax, [esp + 0x18]
call fcn.00477999
push esi
call fcn.0044f658
pop ecx
mov edi, 0x104
lea esi, [esp + 0x18]
call fcn.004783f1
mov edx, esi
call fcn.00477a16
test eax, eax
je case.0x420fec.100002
mov ecx, 0xf423f
cmp ebx, ecx
mov eax, ebx
jle 0x420fad
push 0xa
cdq
pop esi
idiv esi
cmp eax, ecx
jg 0x420fa3
mov ecx, 0x927c4
cmp eax, ecx
jg 0x4211af
je 0x4211a5
mov ecx, 0x61a82
cmp eax, ecx
jg 0x4210bf
je 0x4210b5
mov ecx, 0x30d41
cmp eax, ecx
jg 0x42104d
je 0x421043
add eax, 0xfffe795f
cmp eax, 8
ja case.0x420fec.100002
jmp dword [eax*4 + 0x42150d]
mov eax, 0x4cd36c
jmp 0x421360
mov eax, 0x4cd370
jmp 0x421360
mov eax, 0x4cd374
jmp 0x421360
mov eax, 0x4cd378
jmp 0x421360
mov eax, 0x4cd37c
jmp 0x421360
mov eax, 0x4cd380
jmp 0x421360
mov eax, 0x4cd384
jmp 0x421360
mov eax, 0x4cd388
jmp 0x421360
mov eax, 0x4cd368
jmp 0x421360
sub eax, 0x30d42
je 0x4210ab
dec eax
je 0x4210a1
dec eax
je 0x421097
dec eax
je 0x42108d
dec eax
dec eax
je 0x421083
dec eax
je 0x421079
sub eax, 0x30d39
jne case.0x420fec.100002
mov eax, 0x4cd34c
jmp 0x421360
mov eax, 0x4cd350
jmp 0x421360
mov eax, 0x4cd354
jmp 0x421360
mov eax, 0x4cd358
jmp 0x421360
mov eax, 0x4cd35c
jmp 0x421360
mov eax, 0x4cd360
jmp 0x421360
mov eax, 0x4cd364
jmp 0x421360
mov eax, 0x4cd348
jmp 0x421360
mov ecx, 0x7a122
cmp eax, ecx
jg 0x42113c
je 0x421132
sub eax, 0x61a83
je 0x421128
dec eax
dec eax
je 0x42111e
dec eax
je 0x421114
dec eax
je 0x42110a
dec eax
je 0x421100
dec eax
je 0x4210f6
sub eax, 0x18698
jne case.0x420fec.100002
mov eax, 0x4cd32c
jmp 0x421360
mov eax, 0x4cd330
jmp 0x421360
mov eax, 0x4cd334
jmp 0x421360
mov eax, 0x4cd338
jmp 0x421360
mov eax, 0x4cd33c
jmp 0x421360
mov eax, 0x4cd340
jmp 0x421360
mov eax, 0x4cd344
jmp 0x421360
mov eax, 0x4cd328
jmp 0x421360
sub eax, 0x7a123
je 0x42119b
dec eax
je 0x421191
dec eax
je 0x421187
dec eax
dec eax
je 0x42117d
dec eax
je 0x421173
sub eax, 0x18699
je 0x421169
dec eax
dec eax
jne case.0x420fec.100002
mov eax, 0x4cd30c
jmp 0x421360
mov eax, 0x4cd310
jmp 0x421360
mov eax, 0x4cd314
jmp 0x421360
mov eax, 0x4cd318
jmp 0x421360
mov eax, 0x4cd31c
jmp 0x421360
mov eax, 0x4cd320
jmp 0x421360
mov eax, 0x4cd324
jmp 0x421360
mov eax, 0x4cd308
jmp 0x421360
mov ecx, 0xc3504
cmp eax, ecx
jg 0x4212af
je 0x4212a5
mov ecx, 0xaae64
cmp eax, ecx
jg 0x42123e
je 0x421234
sub eax, 0x927c5
je 0x42122a
dec eax
je 0x421220
dec eax
je 0x421216
dec eax
je 0x42120c
sub eax, 0x18699
je 0x421202
dec eax
je 0x4211f8
dec eax
jne case.0x420fec.100002
mov eax, 0x4cd2ec
jmp 0x421360
mov eax, 0x4cd2f0
jmp 0x421360
mov eax, 0x4cd2f4
jmp 0x421360
mov eax, 0x4cd2f8
jmp 0x421360
mov eax, 0x4cd2fc
jmp 0x421360
mov eax, 0x4cd300
jmp 0x421360
mov eax, 0x4cd304
jmp 0x421360
mov eax, 0x4cd2e8
jmp 0x421360
sub eax, 0xaae65
je 0x42129b
dec eax
je 0x421291
dec eax
je 0x421287
dec eax
je 0x42127d
sub eax, 0x18699
je 0x421273
dec eax
je 0x421269
dec eax
jne case.0x420fec.100002
mov eax, 0x4cd2cc
jmp 0x421360
mov eax, 0x4cd2d0
jmp 0x421360
mov eax, 0x4cd2d4
jmp 0x421360
mov eax, 0x4cd2d8
jmp 0x421360
mov eax, 0x4cd2dc
jmp 0x421360
mov eax, 0x4cd2e0
jmp 0x421360
mov eax, 0x4cd2e4
jmp 0x421360
mov eax, 0x4cd2c8
jmp 0x421360
mov ecx, 0xdbba7
cmp eax, ecx
jg 0x421314
je 0x42130d
sub eax, 0xc3505
je 0x421306
dec eax
je 0x4212ff
sub eax, 0x1869b
je 0x4212f8
dec eax
je 0x4212f1
dec eax
je 0x4212ea
dec eax
dec eax
je 0x4212e3
dec eax
jne case.0x420fec.100002
mov eax, 0x4cd2ac
jmp 0x421360
mov eax, 0x4cd2b0
jmp 0x421360
mov eax, 0x4cd2b4
jmp 0x421360
mov eax, 0x4cd2b8
jmp 0x421360
mov eax, 0x4cd2bc
jmp 0x421360
mov eax, 0x4cd2c0
jmp 0x421360
mov eax, 0x4cd2c4
jmp 0x421360
mov eax, 0x4cd2a8
jmp 0x421360
sub eax, 0xdbba8
je 0x42135b
sub eax, 0x15f89
je 0x421354
dec eax
je 0x42134d
dec eax
je 0x421346
dec eax
je 0x42133f
dec eax
je 0x421338
dec eax
jne case.0x420fec.100002
mov eax, 0x4cd290
jmp 0x421360
mov eax, 0x4cd294
jmp 0x421360
mov eax, 0x4c9d20
jmp 0x421360
mov eax, 0x4cd298
jmp 0x421360
mov eax, 0x4cd29c
jmp 0x421360
mov eax, 0x4cd2a0
jmp 0x421360
mov eax, 0x4cd2a4
push eax
push 0x16
pop ecx
lea eax, [esp + 0x1c]
call fcn.00477a48
pop ecx
lea edx, [esp + 0x18]
call fcn.00477a16
test eax, eax
je 0x4213b8
lea edx, [esp + 0x60]
call fcn.00477a16
test eax, eax
jne 0x420e76
mov al, byte [esp + 0x60]
xor edx, edx
jmp 0x4213aa
cmp edx, 0x15
jae 0x4213b3
mov al, byte [esp + edx + 0x60]
test al, al
je 0x4213b3
mov byte [esp + edx + 0x18], al
mov al, byte [esp + edx + 0x61]
inc edx
call fcn.004789c3
test eax, eax
je 0x421394
mov byte [esp + edx + 0x18], 0
lea esi, [esp + 0x18]
call fcn.004783f1
mov edx, esi
call fcn.00477a16
test eax, eax
jne 0x420e76
lea edx, [esp + 0x60]
call fcn.00477a16
test eax, eax
je 0x4213f3
mov eax, esi
push eax
push str._s000
lea eax, [esp + 0x68]
push edi
push eax
call fcn.00478fcf
add esp, 0x10
lea eax, [esp + 0x168]
call fcn.00477999
lea eax, [esp + 0x60]
push eax
call fcn.004a7f30
pop ecx
mov edx, eax
dec edx
push 0
pop esi
js 0x421427
mov al, byte [esp + edx + 0x60]
call fcn.004789c3
test eax, eax
je 0x421423
inc esi
dec edx
jns 0x421412
test esi, esi
jg 0x42143f
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x64]
push eax
call fcn.004a8a6f
test eax, eax
pop ecx
pop ecx
je 0x42143f
push 3
pop esi
lea eax, [esp + 0x48]
push eax
call fcn.004a7f30
cmp esi, eax
pop ecx
jle 0x42145b
lea eax, [esp + 0x48]
push eax
call fcn.004a7f30
pop ecx
mov esi, eax
lea eax, [esp + 0x48]
push eax
call fcn.004a7f30
pop ecx
lea ecx, [esp + 0x48]
sub ecx, esi
add eax, ecx
push eax
mov ecx, edi
lea eax, [esp + 0x16c]
call fcn.00477a48
pop ecx
push edi
push 0
push eax
lea ebx, [esp + 0x24]
call fcn.0047871a
add esp, 0xc
lea eax, [esp + 0x168]
push 0x4c927c
push eax
call fcn.004a7fc0
lea esi, [esp + 0x170]
call fcn.004783f1
mov eax, esi
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.004a8a6f
add esp, 0x10
test eax, eax
jne 0x4214c7
mov eax, esi
call fcn.00477999
cmp dword [esp + 0x14], 0
je 0x4214de
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x18]
call fcn.004a8050
pop ecx
pop ecx
lea eax, [esp + 0x168]
push eax
push 0x5f8ea8
call fcn.004a8050
xor eax, eax
pop ecx
inc eax
pop ecx
mov ecx, dword [esp + 0x274]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004a8565
mov esp, ebp
pop ebp
ret