Function at 0x643a50
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x7858c8
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x84dea4]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x3c], ebx
mov ecx, dword [esp + 0x70]
mov eax, dword [ecx + 0xc]
sub eax, dword [ecx + 4]
xor ebp, ebp
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ebp
cmp dword [ebx + 0x5c], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x30], ebp
jbe 0x643d5f
mov edi, dword [esp + 0x74]
mov dword [esp + 0x20], ebp
mov esi, dword [ebx + 0x60]
add esi, dword [esp + 0x20]
test dword [esi + 0x84], 0x400
jne 0x643d39
mov ecx, dword [esp + 0x78]
mov eax, dword [ebx]
mov edx, dword [eax + 0xbc]
push ecx
push esi
mov ecx, ebx
call edx
test eax, eax
je 0x643d39
cmp byte [esi + 0x9f], 0
je 0x643d39
cmp dword [esi + 0xa0], ebp
jg 0x643be0
mov ecx, 1
call fcn.004bb690
test eax, eax
je 0x643b33
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebx + 0xe0]
lea edx, [esi + 0xc]
push edx
call fcn.005dcf00
mov eax, dword [esp + 0x74]
mov ebx, dword [esp + 0x14]
jmp 0x643b70
mov ecx, dword [ebx + 0xe0]
lea eax, [esi + 0xc]
push eax
call fcn.004cf1c0
mov ebp, dword [ebx + 0xe0]
mov ebx, dword [ebp + 0xb4]
add ebx, 1
xor edx, edx
mov ecx, eax
div ebx
mov eax, ecx
mov ebx, edx
mov dword [esp + 0x14], ebx
mov ebp, dword [ebp + 0xb4]
add ebp, 1
xor edx, edx
div ebp
mov dword [esp + 0x74], eax
mov ecx, dword [esp + 0x70]
mov edx, dword [ecx + 4]
cmp ebx, edx
jl 0x643d39
cmp ebx, dword [ecx + 0xc]
jge 0x643d39
mov ecx, dword [ecx]
cmp eax, ecx
jl 0x643d39
mov ebp, dword [esp + 0x70]
cmp eax, dword [ebp + 8]
jge 0x643d39
sub eax, ecx
imul eax, dword [esp + 0x24]
movzx ecx, byte [esi + 0x9e]
sub eax, edx
mov edx, dword [edi + 8]
add eax, ebx
mov byte [edx + eax*4 + 2], cl
movzx ecx, byte [esi + 0x9d]
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 1], cl
movzx ecx, byte [esi + 0x9c]
mov edx, dword [edi + 8]
mov byte [edx + eax*4], cl
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 3], 0xff
jmp 0x643d39
lea eax, [esp + 0x50]
push eax
push esi
lea ecx, [esp + 0x48]
push ecx
mov ecx, ebx
call fcn.00532ab0
mov ebx, dword [esp + 0x4c]
sub ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x40]
xor ecx, ecx
cmp ebx, ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], ecx
jle 0x643d39
xor ebp, ebp
test eax, eax
mov dword [esp + 0x2c], ebp
jle 0x643d2a
lea edx, [ecx*4]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + eax]
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], edx
call fcn.005dc940
test eax, eax
je 0x643d04
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x40]
add eax, ecx
add edx, ebp
mov ecx, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x74], edx
call fcn.004bb690
test eax, eax
jne 0x643c9d
mov eax, dword [esp + 0x14]
cdq
and edx, 3
add eax, edx
mov ecx, eax
mov eax, dword [esp + 0x74]
cdq
and edx, 3
sar ecx, 2
add eax, edx
sar eax, 2
mov dword [esp + 0x14], ecx
mov dword [esp + 0x74], eax
jmp 0x643ca5
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x70]
mov ebp, dword [edx + 4]
cmp ecx, ebp
jl 0x643d04
cmp ecx, dword [edx + 0xc]
jge 0x643d04
mov edx, dword [edx]
cmp eax, edx
jl 0x643d04
mov ebx, dword [esp + 0x70]
cmp eax, dword [ebx + 8]
mov ebx, dword [esp + 0x28]
jge 0x643d04
sub eax, edx
imul eax, dword [esp + 0x24]
movzx edx, byte [esi + 0x9e]
sub eax, ebp
add eax, ecx
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4 + 2], dl
movzx edx, byte [esi + 0x9d]
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4 + 1], dl
movzx edx, byte [esi + 0x9c]
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4], dl
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4 + 3], 0xff
mov ebp, dword [esp + 0x2c]
lea eax, [ebx*4]
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
add ebp, 1
cmp ebp, eax
mov dword [esp + 0x2c], ebp
jl 0x643c31
mov ecx, dword [esp + 0x1c]
add ecx, 1
cmp ecx, ebx
mov dword [esp + 0x1c], ecx
jl 0x643c18
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
add dword [esp + 0x20], 0x188
add eax, 1
xor ebp, ebp
cmp eax, dword [ebx + 0x5c]
mov dword [esp + 0x30], eax
jb 0x643ab8
mov eax, dword [esp + 0x58]
cmp eax, ebp
je 0x643d71
push ebp
push 0xfffffffffffffffe
push str.._AVCImVector_NTempest__
push eax
call sub.Storm.dll_Ordinal_403
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0xc