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

Disassembly:
sub esp, 0x16c
mov ecx, dword [esp + 0x174]
mov edx, dword [ecx + 0x208]
push ebx
mov ebx, dword [esp + 0x184]
push ebp
mov ebp, dword [esp + 0x178]
mov eax, dword [ebp + 0x1244c]
mov ecx, dword [ebp + 0x20c08]
mov ecx, dword [ebp + ecx*4 + 0x20c1c]
mov dword [esp + 0x60], eax
mov eax, 1
shl eax, cl
mov dword [esp + 0x20], edx
xor edx, edx
push esi
mov dword [esp + 0x28], eax
xor eax, eax
cmp byte [esp + 0x190], al
push edi
sete al
cmp dword [ebp + 0x12430], edx
mov byte [esp + 0x13], dl
mov dword [esp + 0x14], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x30], 0x10000
lea eax, [eax + eax - 1]
mov dword [esp + 0x48], eax
je 0x3e01ec
cmp dword [ebx + 0x28], 2
mov byte [esp + 0x12], 1
je 0x3e01f1
mov byte [esp + 0x12], 0
mov eax, dword [ebx + 0x54]
mov edx, dword [ebx + 0x50]
mov ecx, eax
imul eax, dword [esp + 0x1a0]
imul ecx, dword [esp + 0x198]
sar ecx, 3
mov dword [esp + 0x40], ecx
mov ecx, dword [ebx + 0x58]
imul ecx, dword [esp + 0x19c]
sar eax, 3
imul edx, eax
sar ecx, 3
mov dword [esp + 0x34], ecx
mov dword [esp + 0x5c], eax
lea esi, [ebp + 0x12560]
mov ecx, 0x22
lea edi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x18], edx
mov dword [esp + 0x78], edx
mov eax, 0x10000
cdq
idiv dword [esp + 0x18]
mov dword [esp + 0x94], 3
mov dword [ebp + 0x20bf8], 0
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x3e027e
mov eax, 0x40000
mov dword [esp + 0x30], eax
cdq
idiv dword [esp + 0x18]
mov dword [esp + 0x1c], eax
cmp byte [esp + 0x12], 0
mov ecx, 0x22
mov esi, ebx
lea edi, [esp + 0xf4]
rep movsd dword es:[edi], dword [esi]
jne 0x3e02b1
mov ecx, dword [ebx + 0x58]
imul ecx, dword [esp + 0x48]
sar ecx, 3
imul ecx, dword [esp + 0x100]
mov dword [esp + 0x100], ecx
jmp 0x3e02ff
mov eax, dword [ebx + 0x58]
cmp eax, 8
je 0x3e02ff
mov edx, eax
imul edx, dword [esp + 0x18]
sar edx, 3
cmp edx, dword [esp + 0x30]
jle 0x3e02db
mov dword [esp + 0x30], 0x40000
mov dword [esp + 0x1c], 1
jmp 0x3e02f4
sar eax, 3
imul eax, dword [esp + 0x18]
mov ecx, eax
mov eax, dword [esp + 0x30]
cdq
idiv ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18c], 0
mov eax, dword [esp + 0x1c]
lea ecx, [eax + eax]
cmp ecx, dword [esp + 0x1a4]
jle 0x3e0322
mov eax, dword [esp + 0x1a4]
add eax, 1
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x1245c]
mov edx, dword [esp + 0x28]
shl eax, 0x10
mov ecx, eax
xor ecx, 0xbeef0370
xor eax, 0xbeef0378
test edx, edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], 0x29
mov dword [esp + 0x64], 0x2d
je 0x3e0421
mov eax, dword [ebp + 0x12544]
test byte [eax + 0x103b0], 1
je 0x3e0421
mov eax, dword [edx + 8]
test al, 8
je 0x3e03c8
test al, al
lea ecx, [edx + 0x6ec]
mov dword [esp + 0x14], ecx
js 0x3e03b7
mov eax, dword [esp + 0x1ac]
cmp eax, 0x400
je 0x3e0399
cmp eax, 0x401
jne 0x3e03b7
mov eax, dword [esp + 0x184]
mov eax, dword [eax]
cmp eax, 0x1902
je 0x3e03b7
cmp eax, 0x84f9
je 0x3e03b7
cmp eax, 0x1901
jne 0x3e0421
cmp dword [ecx], 0
jbe 0x3e0421
mov dword [ebp + 0x20c3c], 1
jmp 0x3e0421
test ah, 1
je 0x3e0421
test dword [edx + 4], 0x104001
jne 0x3e0421
mov ecx, dword [esp + 0x184]
mov eax, dword [ecx]
cmp eax, 0x1902
je 0x3e0421
cmp eax, 0x84f9
je 0x3e0421
cmp eax, 0x1901
je 0x3e0421
mov eax, dword [esp + 0x1ac]
cmp eax, 0x400
je 0x3e0409
cmp eax, 0x401
jne 0x3e0421
mov ecx, dword [ebp + 0x20c30]
mov ecx, dword [ebp + ecx*4 + 0x20c1c]
mov eax, 1
shl eax, cl
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x12544]
test byte [eax + 0x10751], 1
je 0x3e043f
push 1
push ebp
call fcn.003b36a0
mov edx, dword [esp + 0x30]
add esp, 8
cmp dword [ebp + 0x20c3c], 0
je 0x3e04fe
mov ecx, dword [esp + 0x184]
mov eax, dword [edx + 0xc4]
sub eax, dword [ecx + 0x1f8]
mov ecx, dword [edx + 0x284]
sub eax, 1
cmp eax, ecx
mov dword [esp + 0x38], eax
jge 0x3e0474
mov eax, ecx
jmp 0x3e0483
mov edx, dword [edx + 0x28c]
add ecx, edx
cmp eax, ecx
jl 0x3e0483
lea eax, [ecx - 1]
push eax
mov eax, dword [esp + 0x18]
push eax
push ebp
call fcn.003b3380
mov edx, dword [esp + 0x54]
mov ecx, eax
mov edi, 1
shl edi, cl
mov ecx, dword [esp + 0x44]
add ecx, 1
add esp, 0xc
cmp edx, 1
mov dword [esp + 0x3c], eax
mov dword [ebp + 0x20bf8], eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x38], ecx
jne 0x3e04c9
mov esi, dword [esp + 0x14]
mov esi, dword [esi + eax*4 + 8]
sub esi, ecx
jmp 0x3e04d3
mov esi, ecx
mov ecx, dword [esp + 0x14]
sub esi, dword [ecx + eax*4 + 4]
mov ecx, dword [esp + 0x1c]
cmp esi, ecx
jge 0x3e04ef
xor ecx, ecx
test esi, esi
setl cl
sub ecx, 1
and esi, ecx
add eax, edx
mov dword [esp + 0x3c], eax
jmp 0x3e0506
mov esi, dword [esp + 0x1a4]
cmp esi, ecx
jl 0x3e0506
mov esi, ecx
jmp 0x3e0506
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x54]
push edi
push 0x29
push edx
push ebp
mov dword [esp + 0x30], esi
mov dword [esp + 0x5c], 0
call fcn.003bf180
mov eax, dword [ebp + 0x12544]
add esp, 0x10
test byte [eax + 0x103b0], 1
je 0x3e053c
push edi
push ebp
call fcn.003b7810
add esp, 8
cmp byte [esp + 0x12], 0
je 0x3e05a8
mov eax, dword [ebx + 0x58]
cmp eax, 8
je 0x3e0565
sar eax, 3
lea ecx, [esi - 1]
imul eax, ecx
add eax, 1
cmp dword [esp + 0x1c], 1
jne 0x3e0567
mov eax, 1
jmp 0x3e0567
mov eax, esi
mov edx, dword [ebp + 0x20bf8]
add edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x194]
push 1
push edx
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x44]
push edx
push 0
push 0
push 0
push eax
push ecx
push 0
lea edx, [esp + 0x98]
push edx
push ebx
push ebp
call fcn.003c0b20
add esp, 0x38
jmp 0x3e0603
mov eax, dword [ebx + 0xc]
imul eax, dword [esp + 0x34]
cdq
mov ecx, eax
mov eax, dword [ebx + 0x50]
imul eax, dword [esp + 0x40]
mov edi, edx
cdq
add ecx, eax
mov eax, dword [esp + 0x78]
adc edi, edx
add ecx, dword [ebx]
mov edx, dword [ebp + 0x20bf8]
adc edi, dword [ebx + 4]
add edx, dword [esp + 0x54]
mov dword [esp + 0xf4], ecx
push edx
push esi
push eax
mov eax, dword [0x3fa0b8]
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x104]
push edx
push ebp
mov dword [esp + 0x110], edi
call dword [ebp + eax*4 + fcn.000128f4]
add esp, 0x18
cmp dword [ebp + 0x20c3c], 0
jne 0x3e0615
cmp esi, dword [esp + 0x1a4]
jl 0x3e064c
mov eax, dword [ebp + 0x11cc4]
cmp byte [eax + 0x18], 0
jne 0x3e0644
mov ecx, dword [eax]
cmp byte [ecx + 0x3d], 0
jne 0x3e0644
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0x40]
mov edi, dword [edx + 0xc]
lea ecx, [edi + ecx*4]
cmp dword [edx], ecx
jne 0x3e0644
mov ecx, dword [eax]
cmp dword [ecx + 0x11c28], 0
jbe 0x3e064c
push 0
push eax
call fcn.003c0490
cmp dword [esp + 0x1a4], 0
mov edx, dword [esp + 0x184]
mov eax, dword [edx + 0x6c]
mov dword [esp + 0x44], eax
jle 0x3e0a42
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x3c]
lea eax, [ecx + edx*4 + 4]
mov dword [esp + 0x50], eax
jmp 0x3e0685
mov ebx, dword [esp + 0x190]
mov esi, dword [esp + 0x20]
mov edx, dword [ebx + 0x58]
mov eax, dword [esp + 0x1a4]
imul edx, esi
imul edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x18]
sar edx, 3
add dword [esp + 0x34], edx
mov edx, dword [esp + 0x4c]
sub eax, esi
test eax, eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x1a4], eax
mov dword [esp + 0x24], edx
jle 0x3e08c6
mov ecx, dword [ebp + 0x1255c]
mov edi, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x1c]
mov eax, edx
xor eax, 1
mov dword [esp + 0x4c], eax
imul eax, dword [esp + 0x30]
cdq
and ecx, 0x7fffffff
add edi, eax
adc ecx, edx
cmp dword [ebp + 0x20c3c], 0
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], ecx
je 0x3e0768
mov edi, dword [esp + 0x48]
mov ecx, dword [esp + 0x3c]
imul esi, edi
mov edx, dword [esp + 0x38]
mov eax, 1
shl eax, cl
add edx, esi
cmp edi, 1
mov dword [ebp + 0x20bf8], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], edx
jne 0x3e072b
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 4]
sub eax, edx
jmp 0x3e0733
mov eax, edx
mov edx, dword [esp + 0x50]
sub eax, dword [edx]
mov esi, dword [esp + 0x1c]
cmp eax, esi
jge 0x3e0759
xor edx, edx
test eax, eax
setl dl
add ecx, edi
add edi, edi
add edi, edi
mov dword [esp + 0x3c], ecx
sub edx, 1
and edx, eax
add dword [esp + 0x50], edi
mov esi, edx
jmp 0x3e076c
mov eax, dword [esp + 0x1a4]
cmp eax, esi
jge 0x3e0773
mov esi, eax
jmp 0x3e0773
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x1a4]
test esi, esi
mov dword [esp + 0x20], esi
jle 0x3e08c2
cmp esi, eax
jle 0x3e0789
mov esi, eax
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + eax*4 + 0x60]
mov edi, dword [esp + eax*4 + 0x54]
push ecx
push edx
push edi
push ebp
mov dword [esp + 0x24], edi
call fcn.003bf180
mov eax, dword [ebp + 0x12544]
add esp, 0x10
test byte [eax + 0x103b0], 1
je 0x3e07c6
mov ecx, dword [esp + 0x2c]
push ecx
push ebp
call fcn.003b7810
add esp, 8
cmp byte [esp + 0x12], 0
je 0x3e0830
mov eax, dword [ebx + 0x58]
cmp eax, 8
je 0x3e07ef
sar eax, 3
add esi, 0xffffffff
imul eax, esi
add eax, 1
cmp dword [esp + 0x1c], 1
jne 0x3e07f1
mov eax, 1
jmp 0x3e07f1
mov eax, esi
mov edx, dword [ebp + 0x20bf8]
mov ecx, dword [esp + 0x194]
push 0
add edx, edi
push edx
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x44]
push edx
push 0
push 0
push 0
push eax
push ecx
push 0
lea edx, [esp + 0x98]
push edx
push ebx
push ebp
call fcn.003c0b20
add esp, 0x38
jmp 0x3e088b
mov eax, dword [ebx + 0xc]
imul eax, dword [esp + 0x34]
cdq
mov ecx, eax
mov eax, dword [ebx + 0x50]
imul eax, dword [esp + 0x40]
mov edi, edx
cdq
add ecx, eax
mov eax, dword [esp + 0x78]
adc edi, edx
add ecx, dword [ebx]
mov edx, dword [ebp + 0x20bf8]
adc edi, dword [ebx + 4]
add edx, dword [esp + 0x14]
mov dword [esp + 0xf4], ecx
push edx
push esi
push eax
mov eax, dword [0x3fa0b8]
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x104]
push edx
push ebp
mov dword [esp + 0x110], edi
call dword [ebp + eax*4 + fcn.000128f4]
add esp, 0x18
mov eax, dword [ebp + 0x11cc4]
cmp byte [eax + 0x18], 0
jne 0x3e08ba
mov esi, dword [eax]
cmp byte [esi + 0x3d], 0
jne 0x3e08ba
mov ecx, esi
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0x40]
mov edi, dword [edx + 0xc]
lea ecx, [edi + ecx*4]
cmp dword [edx], ecx
jne 0x3e08ba
cmp dword [esi + 0x11c28], 0
jbe 0x3e08c2
push 0
push eax
call fcn.003c0490
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x18c], 0
je 0x3e08fe
cmp ecx, 0x800
jge 0x3e0904
mov eax, dword [esp + 0x28]
imul eax, ecx
cmp eax, 0x800
jle 0x3e08f1
mov eax, 0x800
cdq
idiv ecx
imul eax, ecx
mov dword [esp + 0x14], eax
cdq
idiv dword [esp + 0x18]
mov edi, eax
jmp 0x3e0920
cmp ecx, 0x800
jle 0x3e090c
mov dword [esp + 0x14], ecx
jmp 0x3e091b
mov eax, 0x800
cdq
idiv ecx
imul eax, ecx
mov dword [esp + 0x14], eax
mov edi, 1
mov eax, dword [esp + 0x24]
mov edx, dword [esp + eax*4 + 0x60]
mov eax, dword [esp + eax*4 + 0x54]
push edx
push eax
push ebp
call fcn.003b7b60
add esp, 0xc
test al, al
je 0x3e0a47
mov ebx, dword [esp + 0x24]
imul ebx, dword [esp + 0x30]
mov ecx, dword [ebp + 0x1255c]
mov esi, dword [esp + 0x28]
add ebx, dword [ecx + 0x14]
test esi, esi
mov dword [esp + 0x24], 0
jle 0x3e0a34
cmp edi, esi
jle 0x3e096b
mov edi, esi
cmp dword [esp + 0x24], 0
jne 0x3e09a7
imul esi, dword [esp + 0x18]
cmp dword [esp + 0x14], esi
jle 0x3e098e
mov edx, dword [0x3fa0b8]
push esi
push ebx
call dword [ebp + edx*4 + 0x12954]
jmp 0x3e09a0
mov esi, dword [esp + 0x14]
mov eax, dword [0x3fa0b8]
push esi
push ebx
call dword [ebp + eax*4 + 0x12954]
add esp, 8
mov dword [esp + 0x24], esi
mov esi, edi
imul esi, dword [esp + 0x18]
sub dword [esp + 0x24], esi
cmp dword [esp + 0x188], 0
je 0x3e09e2
mov ecx, dword [0x3fa0b8]
mov edx, dword [ebp + ecx*4 + 0x12954]
mov eax, dword [ebp + 0x12518]
mov ecx, dword [esp + 0x44]
push edx
push eax
push esi
push ebx
push ecx
call fcn.003f09e0
add esp, 0x14
jmp 0x3e0a0f
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x184]
mov edx, edi
imul edx, dword [esp + 0x1a0]
push ecx
push ebx
mov dword [eax + 0xd8], edx
mov edx, dword [esp + 0x70]
push eax
push edx
call dword [esp + 0x1b8]
add esp, 0x10
mov eax, dword [esp + 0x184]
mov ecx, dword [eax + 0x7c]
imul ecx, edi
add dword [esp + 0x44], ecx
add ebx, esi
mov esi, dword [esp + 0x28]
sub esi, edi
test esi, esi
mov dword [esp + 0x28], esi
jg 0x3e0965
cmp dword [esp + 0x1a4], 0
jg 0x3e067a
mov byte [esp + 0x13], 1
mov edx, dword [ebp + 0x12544]
test byte [edx + 0x10751], 1
je 0x3e0a61
push 0
push ebp
call fcn.003b36a0
add esp, 8
mov eax, dword [ebp + 0x12544]
test byte [eax + 0x103b0], 1
je 0x3e0a88
push 0xfff
push ebp
call fcn.003b7810
add esp, 8
mov dword [ebp + 0x20c3c], 0
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x16c
ret