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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x10], 1
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
test eax, eax
je 0x403a20
cmp byte [eax], 0x31
setne al
cmp dword [ebp + 0x24], 0x38
setne dl
or eax, edx
test al, 1
jne 0x403a20
test ebx, ebx
mov eax, 0xfffffffe
je 0x403a25
mov dword [ebx + 0x18], 0
mov ecx, dword [ebx + 0x20]
test ecx, ecx
jne 0x4036e1
mov dword [ebx + 0x20], sym._zcalloc
mov dword [ebx + 0x28], 0
mov edi, dword [ebx + 0x24]
test edi, edi
jne 0x4036ef
mov dword [ebx + 0x24], sym._zcfree
cmp dword [ebp + 0xc], 0xffffffff
je 0x403a40
test esi, esi
js 0x403a50
cmp esi, 0xf
jg 0x403a30
mov ecx, dword [ebp + 0x18]
dec ecx
cmp ecx, 8
seta dl
cmp dword [ebp + 0x10], 8
setne al
or eax, edx
test al, 1
jne 0x403a68
cmp esi, 7
setle al
cmp esi, 0xf
setg dl
or eax, edx
test al, 1
jne 0x403a68
mov edi, dword [ebp + 0xc]
xor ecx, ecx
shr edi, 0x1f
cmp dword [ebp + 0xc], 9
setg cl
or edi, ecx
jne 0x403a68
mov eax, dword [ebp + 0x1c]
xor edx, edx
shr eax, 0x1f
cmp dword [ebp + 0x1c], 4
setg dl
or eax, edx
jne 0x403a68
cmp esi, 8
je 0x403a5e
mov edx, 0x16c0
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x20]
mov edi, eax
test edi, edi
mov eax, 0xfffffffc
je 0x403a25
mov dword [edi + 0x30], esi
mov ecx, esi
mov eax, 1
mov dword [ebx + 0x1c], edi
mov edx, dword [ebp - 0x10]
shl eax, cl
mov dword [edi + 0x2c], eax
mov ecx, dword [ebp + 0x18]
dec eax
mov dword [edi + 0x34], eax
mov esi, dword [ebp + 0x18]
mov eax, 0xaaaaaaab
mov dword [edi + 0x18], edx
add ecx, 7
mov edx, 1
mov dword [edi + 0x50], ecx
shl edx, cl
add esi, 9
mov dword [edi + 0x4c], edx
mov ecx, edx
dec ecx
mul esi
mov esi, 2
mov dword [edi + 0x54], ecx
mov dword [edi], ebx
shr edx, 1
mov dword [edi + 0x58], edx
mov edx, 2
mov dword [edi + 0x1c], 0
mov dword [ebp - 0x14], 1
mov dword [esp + 8], edx
mov ecx, dword [edi + 0x2c]
mov dword [esp + 4], ecx
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call dword [ebx + 0x20]
mov dword [edi + 0x38], eax
mov dword [esp + 8], esi
mov edx, dword [edi + 0x2c]
mov dword [esp + 4], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x20]
mov dword [edi + 0x40], eax
mov eax, 2
mov dword [esp + 8], eax
mov esi, dword [edi + 0x4c]
mov dword [esp + 4], esi
mov edx, dword [ebx + 0x28]
mov esi, 4
mov dword [esp], edx
call dword [ebx + 0x20]
mov ecx, dword [ebp + 0x18]
add ecx, 6
shl dword [ebp - 0x14], cl
mov dword [edi + 0x44], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x169c], eax
mov dword [esp + 8], esi
mov edx, dword [edi + 0x169c]
mov dword [esp + 4], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x20]
mov edx, dword [edi + 0x169c]
mov esi, dword [edi + 0x38]
mov ecx, eax
mov dword [edi + 8], eax
test esi, esi
lea eax, [edx*4]
mov dword [edi + 0xc], eax
je 0x403a75
mov esi, dword [edi + 0x40]
test esi, esi
je 0x403a75
mov eax, dword [edi + 0x44]
test eax, eax
je 0x403a75
test ecx, ecx
je 0x403a75
mov eax, edx
lea esi, [edx + edx*2]
and eax, 0xfffffffe
add eax, ecx
lea edx, [ecx + esi]
mov esi, dword [ebp + 0x1c]
movzx ecx, byte [ebp + 0x10]
mov dword [edi + 0x16a4], eax
mov eax, dword [ebp + 0xc]
test ebx, ebx
mov dword [edi + 0x1698], edx
mov dword [edi + 0x88], esi
mov dword [edi + 0x84], eax
mov byte [edi + 0x24], cl
je 0x403a68
mov esi, dword [ebx + 0x1c]
test esi, esi
je 0x403a68
mov edi, dword [ebx + 0x20]
test edi, edi
je 0x403a68
mov ecx, dword [ebx + 0x24]
test ecx, ecx
je 0x403a68
mov dword [ebx + 0x2c], 2
mov edx, dword [esi + 8]
mov dword [ebx + 0x14], 0
mov dword [ebx + 8], 0
mov dword [esi + 0x10], edx
mov edx, dword [esi + 0x18]
mov dword [ebx + 0x18], 0
mov dword [esi + 0x14], 0
test edx, edx
js 0x403b7a
cmp edx, 1
sbb eax, eax
and eax, 0x47
add eax, 0x2a
cmp edx, 2
mov dword [esi + 4], eax
je 0x403b5d
mov dword [esp], 0
xor eax, eax
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sym._adler32
mov dword [ebx + 0x30], eax
mov dword [esi + 0x28], 0
mov dword [esp], esi
call sym.__tr_init
mov eax, dword [esi + 0x2c]
xor ecx, ecx
mov ebx, dword [esi + 0x4c]
mov edi, dword [esi + 0x44]
add eax, eax
lea edx, [ebx + ebx - 2]
mov word [edi + ebx*2 - 2], 0
mov dword [esi + 0x3c], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], edi
call sym._memset
mov dword [esi + 0x6c], 0
mov eax, dword [esi + 0x84]
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
lea edi, [eax + eax*2]
shl edi, 2
movzx ebx, word [edi + 0x40d382]
xor eax, eax
movzx edx, word [edi + 0x40d380]
movzx ecx, word [edi + 0x40d384]
mov dword [esi + 0x78], 2
mov dword [esi + 0x80], ebx
movzx ebx, word [edi + 0x40d386]
mov dword [esi + 0x8c], edx
mov dword [esi + 0x90], ecx
mov dword [esi + 0x60], 2
mov dword [esi + 0x7c], ebx
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
jmp 0x403a25
mov eax, 0xfffffffa
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x10], 2
sub esi, 0x10
jmp 0x40370a
mov dword [ebp + 0xc], 6
test esi, esi
jns 0x403701
nop
mov dword [ebp - 0x10], 0
neg esi
jmp 0x40370a
mov esi, 9
jmp 0x403772
add esp, 0x1c
mov eax, 0xfffffffe
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edi + 4], 0x29a
mov edi, dword [str.insufficient_memory]
test ebx, ebx
mov dword [ebx + 0x18], edi
je 0x403ad1
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x403ad1
mov esi, dword [ecx + 4]
cmp esi, 0x2a
setne al
xor edx, edx
cmp esi, 0x45
setne dl
test eax, edx
je 0x403adb
cmp esi, 0x49
setne al
xor edx, edx
cmp esi, 0x5b
setne dl
test eax, edx
je 0x403adb
cmp esi, 0x67
setne al
xor edx, edx
cmp esi, 0x71
setne dl
test eax, edx
je 0x403adb
cmp esi, 0x29a
je 0x403adb
mov eax, 0xfffffffc
jmp 0x403a25
mov eax, dword [ecx + 8]
test eax, eax
jne 0x403b15
mov eax, dword [ecx + 0x44]
test eax, eax
jne 0x403b4b
mov eax, dword [ecx + 0x40]
test eax, eax
jne 0x403b39
mov eax, dword [ecx + 0x38]
test eax, eax
jne 0x403b27
mov dword [esp + 4], ecx
mov edx, dword [ebx + 0x28]
mov dword [esp], edx
call dword [ebx + 0x24]
mov dword [ebx + 0x1c], 0
mov eax, 0xfffffffc
jmp 0x403a25
mov dword [esp + 4], eax
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x403ae2
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x403af7
mov dword [esp + 4], eax
mov edi, dword [ebx + 0x28]
mov dword [esp], edi
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x403af0
mov dword [esp + 4], eax
mov esi, dword [ebx + 0x28]
mov dword [esp], esi
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x403ae9
mov dword [esp], 0
xor ecx, ecx
xor edi, edi
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
call sym._crc32
jmp 0x403971
neg edx
mov dword [esi + 0x18], edx
jmp 0x403942