Function at 0x442820
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x90
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov ebx, dword [ebp + 0xc8]
dec ebx
cmp ebx, 1
jg 0x44283d
mov ebx, 1
push 3
lea eax, [esp + 0x3c]
push 0x30
lea ecx, [ebp + 0xdc]
push eax
call fcn.004b90b0
mov ecx, dword [eax]
xor eax, eax
mov dword [esp + 0x38], ecx
mov ecx, 7
lea edi, [esp + 0x71]
mov byte [esp + 0x70], 0
rep stosd dword es:[edi], eax
xor edx, edx
mov byte [esp + 0x50], 0
stosw word es:[edi], ax
mov dword [esp + 0x51], edx
mov dword [esp + 0x2c], 0x56c7d8
mov dword [esp + 0x55], edx
stosb byte es:[edi], al
mov eax, dword [ebp + 0xfc]
mov dword [esp + 0x59], edx
mov word [esp + 0x5d], dx
cmp eax, 1
mov byte [esp + 0x5f], dl
jne 0x4428a3
mov dword [esp + 0x2c], 0x56c7d4
mov eax, dword [ebp + 0xe8]
test eax, eax
jle 0x4428c3
push eax
lea eax, [esp + 0x54]
push str.__d.__0_d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
jmp 0x4428e9
mov edi, 0x56c7c4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, 1
cmp word [esp + 0x38], si
jb 0x442929
cmp word [esp + 0x3a], si
jae 0x44294a
mov cx, word [ebp + 0xe0]
movsx eax, cx
cdq
sub eax, edx
mov word [esp + 0x2e], cx
sar eax, 1
mov word [esp + 0x2c], ax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0xc0]
test eax, 0x80000000
je 0x443044
or edx, 0xffffffff
xor ecx, ecx
mov word [esp + 0x22], dx
mov word [esp + 0x20], dx
mov edx, dword [ebp + 0xdc]
xor esi, esi
shr eax, 3
mov dword [esp + 0x48], edx
mov edx, dword [ebp + 0xe0]
and eax, 3
xor edi, edi
cmp eax, 3
mov word [esp + 0x1e], cx
mov word [esp + 0x1c], cx
mov word [esp + 0x18], cx
mov word [esp + 0x1a], cx
mov word [esp + 0x34], cx
mov word [esp + 0x36], cx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov word [esp + 0x40], cx
mov word [esp + 0x42], cx
mov dword [esp + 0x4c], edx
ja case.default.0x4429c1
jmp dword [eax*4 + 0x443054]
mov eax, dword [ebp + 0xd4]
movsx edx, word [ebp + 0xf0]
push eax
movsx eax, word [ebp + 0xec]
sub edx, eax
inc edx
push edx
push ecx
push ecx
lea ecx, [esp + 0x34]
call fcn.004b4a60
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
mov edx, dword [eax + 4]
mov ax, word [ebp + 0xec]
movsx eax, ax
mov dword [esp + 0x20], edx
mov dx, word [ebp + 0xf2]
mov edi, eax
mov word [esp + 0x1c], ax
movsx eax, dx
sub edi, ecx
push eax
add word [esp + 0x24], di
lea ecx, [esp + 0x20]
call fcn.00433100
mov cx, word [ebp + 0xec]
mov dx, word [ebp + 0xf2]
mov edi, dword [ebp + 0xcc]
mov word [esp + 0x30], cx
mov cx, word [ebp + 0xf0]
mov word [esp + 0x32], dx
mov eax, dword [esp + 0x30]
mov word [esp + 0x30], cx
mov cx, word [ebp + 0xec]
mov dword [esp + 0x18], eax
mov word [esp + 0x32], dx
mov eax, dword [esp + 0x30]
mov dx, word [esp + 0x3a]
mov dword [esp + 0x34], eax
mov ax, word [ebp + 0xee]
inc edi
shr dx, 1
imul edi, ebx
sub ax, dx
mov word [esp + 0x10], cx
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x40], ecx
mov byte [esp + 0x4f], 3
jmp 0x442d6b
mov edx, dword [ebp + 0xd4]
movsx eax, word [ebp + 0xf0]
push edx
movsx edx, word [ebp + 0xec]
sub eax, edx
inc eax
push eax
push ecx
push ecx
lea ecx, [esp + 0x78]
call fcn.004b4a60
mov ecx, dword [eax]
mov dx, word [ebp + 0xee]
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
mov ax, word [ebp + 0xec]
movsx eax, ax
mov edi, eax
mov word [esp + 0x1c], ax
sub edi, ecx
add word [esp + 0x20], di
movsx ecx, dx
push ecx
lea ecx, [esp + 0x20]
call fcn.004330c0
mov dx, word [ebp + 0xec]
mov ax, word [ebp + 0xee]
mov edi, dword [ebp + 0xcc]
mov word [esp + 0x10], dx
mov dx, word [ebp + 0xf0]
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
mov word [esp + 0x12], ax
mov ax, word [esp + 0x3a]
inc edi
shr ax, 1
imul edi, ebx
add ax, word [ebp + 0xf2]
mov dword [esp + 0x18], ecx
mov word [esp + 0x10], dx
mov ecx, dword [esp + 0x10]
mov dx, word [ebp + 0xec]
mov dword [esp + 0x34], ecx
mov word [esp + 0x10], dx
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x40], ecx
mov byte [esp + 0x4f], 3
jmp 0x442d6b
movsx edx, word [ebp + 0xf2]
movsx eax, word [ebp + 0xee]
sub edx, eax
inc edx
push edx
mov edx, dword [ebp + 0xd4]
push edx
push ecx
push ecx
lea ecx, [esp + 0x70]
call fcn.004b4a60
mov ecx, dword [eax]
mov dx, word [ebp + 0xee]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 4]
mov ax, word [ebp + 0xf0]
movsx eax, ax
movsx edx, dx
mov esi, eax
mov dword [esp + 0x20], ecx
sub esi, ecx
push edx
add word [esp + 0x20], si
lea ecx, [esp + 0x20]
mov word [esp + 0x24], ax
call fcn.004330c0
mov cx, word [ebp + 0xee]
mov ax, word [ebp + 0xf0]
mov esi, dword [ebp + 0xcc]
mov word [esp + 0x12], cx
mov cx, word [ebp + 0xf2]
mov word [esp + 0x10], ax
mov edx, dword [esp + 0x10]
mov word [esp + 0x10], ax
movsx eax, word [ebp + 0x16]
mov word [esp + 0x12], cx
inc esi
movsx ecx, word [ebp + 0x12]
imul esi, ebx
sub eax, ecx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x34], edx
push eax
movsx edx, word [ebp + 0x14]
movsx eax, word [ebp + 0x10]
sub edx, eax
lea ecx, [esp + 0x14]
inc edx
mov dword [esp + 0x30], ebx
push edx
push 0
push 0
call fcn.004b4a60
mov ecx, dword [eax]
mov dx, word [ebp + 0xec]
sub dx, word [ebp + 0xf0]
mov dword [esp + 0x98], ecx
mov eax, dword [eax + 4]
mov cx, word [esp + 0x3a]
shr cx, 1
lea eax, [edx + eax - 1]
mov dx, word [ebp + 0xee]
sub dx, cx
mov word [esp + 0x10], ax
mov word [esp + 0x12], dx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x40], eax
mov byte [esp + 0x4f], 1
jmp 0x442d6b
movsx edx, word [ebp + 0xf2]
movsx eax, word [ebp + 0xee]
sub edx, eax
inc edx
push edx
mov edx, dword [ebp + 0xd4]
push edx
push ecx
push ecx
lea ecx, [esp + 0xa0]
call fcn.004b4a60
mov ecx, dword [eax]
mov dx, word [ebp + 0xee]
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
mov ax, word [ebp + 0xec]
movsx eax, ax
mov esi, eax
mov word [esp + 0x1c], ax
sub esi, ecx
add word [esp + 0x20], si
movsx ecx, dx
push ecx
lea ecx, [esp + 0x20]
call fcn.004330c0
mov dx, word [ebp + 0xec]
mov ax, word [ebp + 0xee]
mov esi, dword [ebp + 0xcc]
mov word [esp + 0x10], dx
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
mov ax, word [ebp + 0xf2]
mov word [esp + 0x10], dx
mov dx, word [ebp + 0xf0]
mov dword [esp + 0x18], ecx
sub dx, word [ebp + 0xec]
mov word [esp + 0x12], ax
mov ecx, dword [esp + 0x10]
mov ax, word [esp + 0x3a]
inc esi
mov dword [esp + 0x34], ecx
mov cx, word [ebp + 0xee]
imul esi, ebx
shr ax, 1
inc edx
sub cx, ax
mov word [esp + 0x10], dx
mov word [esp + 0x12], cx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x40], edx
mov byte [esp + 0x4f], 0
xor ecx, ecx
mov eax, dword [ebp + 0xc4]
mov edx, 1
mov dword [esp + 0x10], eax
mov dword [0x673498], eax
push ecx
mov word [esp + 0x28], dx
mov word [esp + 0x2a], dx
mov edx, dword [esp + 0x28]
push edi
lea eax, [esp + 0x24]
push esi
push eax
mov ecx, 0x673490
mov dword [0x673494], edx
call fcn.00493230
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x10]
mov word [esp + 0x26], 2
mov ecx, dword [esp + 0x24]
push 0
lea esi, [ebp + 0xec]
push edx
mov dword [0x673494], ecx
push eax
push esi
mov ecx, 0x673490
mov dword [0x673498], edi
call fcn.00493230
test byte [ebp + 0xc0], 2
je 0x442e21
movsx edx, word [esp + 0x36]
movsx eax, word [esp + 0x34]
mov word [esp + 0x26], 1
mov ecx, dword [esp + 0x24]
mov dword [0x673494], ecx
push edx
movsx ecx, word [esp + 0x1e]
movsx edx, word [esp + 0x1c]
push eax
push ecx
push edx
mov ecx, 0x673490
mov dword [0x673498], edi
call fcn.00492360
test byte [ebp + 0xd8], 1
je 0x443034
lea eax, [ebp + 0x10]
lea ecx, [esp + 0x48]
push eax
push ecx
mov ecx, ebp
call fcn.0041d210
mov eax, dword [ebp + 0xc8]
mov dword [esp + 0x18], 0
test eax, eax
jle 0x443034
mov eax, dword [esp + 0x3a]
and eax, 0xffff
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
and eax, 0xffff
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x18]
mov ecx, ebp
push edx
call fcn.00442620
mov edi, eax
mov eax, dword [ebp + 0xfc]
cmp eax, 1
mov eax, dword [ebp + 0xe8]
mov ecx, dword [eax*4 + 0x5354d8]
mov eax, edi
jne 0x442eb7
xor edx, edx
div ecx
mov eax, edi
push edx
xor edx, edx
div ecx
lea ecx, [esp + 0x54]
lea edx, [esp + 0x74]
push eax
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x442ee8
cdq
xor eax, edx
sub eax, edx
xor edx, edx
div ecx
mov eax, edi
push edx
cdq
idiv ecx
lea ecx, [esp + 0x54]
lea edx, [esp + 0x74]
push eax
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x80]
push edi
push eax
call fcn.00470ff0
add esp, 0x18
mov ecx, dword [esp + 0x2c]
lea edi, [esp + 0x70]
push ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
imul ecx, dword [esp + 0x34]
push ecx
push eax
push eax
lea ecx, [esp + 0x34]
call fcn.004b4a60
mov eax, dword [ebp + 0xc0]
shr eax, 3
and eax, 3
cmp eax, 3
ja case.default.0x442f20
jmp dword [eax*4 + 0x443064]
movsx eax, word [esi + 4]
movsx edx, word [esi]
sub eax, edx
mov ecx, dword [esp + 0x40]
inc eax
imul eax, dword [esp + 0x18]
cdq
idiv ebx
mov dx, word [esp + 0x42]
mov word [esp + 0x12], dx
mov word [esp + 0x34], ax
mov eax, dword [esp + 0x34]
add eax, ecx
lea ecx, [esp + 0x38]
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x3c], eax
call fcn.004b4a90
jmp case.default.0x442f20
movsx eax, word [esi + 6]
movsx edx, word [esi + 2]
sub eax, edx
mov ecx, dword [esp + 0x42]
inc eax
mov edi, dword [esp + 0x28]
imul eax, dword [esp + 0x18]
cdq
idiv ebx
mov word [esp + 0x62], ax
mov eax, dword [esp + 0x62]
add ecx, eax
movsx eax, word [esp + 0x40]
mov edx, eax
mov word [esp + 0x28], ax
sub edx, edi
add word [esp + 0x24], dx
jmp 0x442fe6
movsx eax, word [esi + 6]
movsx edx, word [esi + 2]
sub eax, edx
mov ecx, dword [esp + 0x42]
inc eax
mov edi, dword [esp + 0x24]
imul eax, dword [esp + 0x18]
cdq
idiv ebx
mov word [esp + 0x6a], ax
mov eax, dword [esp + 0x6a]
add ecx, eax
movsx eax, word [esp + 0x40]
mov edx, eax
mov word [esp + 0x24], ax
sub edx, edi
add word [esp + 0x28], dx
mov edi, dword [esp + 0x26]
movsx eax, cx
mov ecx, eax
mov word [esp + 0x26], ax
sub ecx, edi
add word [esp + 0x2a], cx
push 0
push 0
lea edx, [esp + 0x2c]
push 0xffffffffffffffff
lea eax, [esp + 0x54]
push edx
lea ecx, [esp + 0x80]
push eax
push ecx
mov ecx, 0x673490
call fcn.004996d0
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0xc8]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x442e6e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x90
ret
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret