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

Disassembly:
push esi
mov esi, eax
cmp dword [esi + 0x37c], 0
lea eax, [esi + 0x328]
jne 0x1012de15
mov dword [eax + 0x68], 0
mov ecx, dword [esi]
xor edx, edx
cmp dword [ecx + 0x284], 2
sete dl
mov dword [eax + 0x6c], edx
cmp dword [esi + 0x134], 0
je 0x1012dde4
mov ecx, dword [eax + 0x38]
test ecx, ecx
je 0x1012dde4
mov dword [eax + 0x64], 0
push ecx
jmp 0x1012ddf7
cmp dword [eax + 0x40], 0
je 0x1012de15
mov ecx, dword [eax + 0x3c]
mov dword [eax + 0x64], 1
mov edx, dword [ecx]
push edx
push str.CWD__s
push eax
call fcn.10135720
add esp, 0xc
test eax, eax
jne 0x1012de1a
mov dword [esi + 0x398], 0x10
pop esi
ret
call fcn.1012d640
pop esi
ret
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0x1c]
push esi
mov esi, dword [ebx]
mov ecx, dword [esi + 0x863c]
xor eax, eax
cmp ebp, 0xd
push edi
mov dword [esp + 0x1c], ecx
lea edi, [ebx + 0x328]
jl 0x1012de62
cmp ebp, 0xe
jle 0x1012de5a
cmp ebp, 0xf
jne 0x1012de62
mov ecx, dword [esi + 0x1ec]
jmp 0x1012de68
mov ecx, dword [esi + 0x1f0]
jmp 0x1012de68
mov ecx, dword [esi + 0x1e8]
cmp dword [esp + 0x20], eax
je 0x1012de73
mov dword [edi + 0x64], eax
jmp 0x1012de76
inc dword [edi + 0x64]
cmp ecx, eax
je 0x1012decb
xor edx, edx
cmp dword [edi + 0x64], eax
jle 0x1012de8e
test ecx, ecx
je 0x1012decb
mov ecx, dword [ecx + 4]
inc edx
cmp edx, dword [edi + 0x64]
jl 0x1012de81
test ecx, ecx
je 0x1012decb
mov ecx, dword [ecx]
cmp byte [ecx], 0x2a
jne 0x1012dea3
inc ecx
mov dword [edi + 0x68], 1
jmp 0x1012dea6
mov dword [edi + 0x68], eax
push ecx
push 0x10179af4
push edi
call fcn.10135720
add esp, 0xc
test eax, eax
jne 0x1012e16f
pop edi
pop esi
mov dword [ebx + 0x398], ebp
pop ebp
pop ebx
add esp, 8
ret
mov ecx, ebp
sub ecx, 0xd
je 0x1012e108
sub ecx, 1
je 0x1012def2
sub ecx, 1
je 0x1012e16f
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 8
jmp 0x1012dda0
mov esi, dword [ebx]
mov edx, dword [esi + 0x863c]
mov ecx, dword [esi + 0x8628]
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x862c]
mov eax, ecx
or eax, edx
je 0x1012e0c8
xor ebp, ebp
cmp edx, ebp
jg 0x1012df4e
jl 0x1012df20
cmp ecx, ebp
jae 0x1012df4e
mov ecx, dword [edi + 0x48]
push ecx
push str.SIZE__s
push edi
call fcn.10135720
add esp, 0xc
cmp eax, ebp
jne 0x1012e16f
pop edi
pop esi
pop ebp
mov dword [ebx + 0x398], 0x19
xor eax, eax
pop ebx
add esp, 8
ret
mov dword [esi + 0x2a0], 1
mov eax, dword [ebx + 0x1ec]
cmp eax, ebp
je 0x1012e03f
push ebp
push edx
mov edx, dword [ebx + 0x1f0]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, ebp
je 0x1012e03f
cmp eax, 2
je 0x1012df9d
push str.Could_not_seek_stream
push esi
call fcn.101274f0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1f
pop ebx
add esp, 8
ret
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
jmp 0x1012dfb0
mov edi, dword [esi + 0x8628]
sub edi, dword [esp + 0x10]
mov ebp, dword [esi + 0x862c]
sbb ebp, dword [esp + 0x14]
js 0x1012dfd7
jg 0x1012dfd0
cmp edi, 0x4000
jbe 0x1012dfd7
mov edi, 0x4000
xor ebp, ebp
mov eax, dword [ebx + 0x1f8]
mov ecx, dword [ebx + 0x1f4]
push eax
push edi
lea eax, [esi + 0x524]
push 1
push eax
call ecx
xor ecx, ecx
add esp, 0x10
add dword [esp + 0x10], eax
adc dword [esp + 0x14], ecx
test ecx, ecx
jl 0x1012e0ad
jg 0x1012e00f
test eax, eax
jbe 0x1012e0ad
cmp ecx, ebp
jg 0x1012e0ad
jl 0x1012e021
cmp eax, edi
ja 0x1012e0ad
mov edx, dword [esp + 0x14]
cmp edx, dword [esi + 0x862c]
jg 0x1012e03f
jl 0x1012dfb0
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x8628]
jb 0x1012dfb0
mov eax, dword [esi + 0x1b4]
mov ecx, dword [esi + 0x1b0]
test eax, eax
jl 0x1012e0c8
jg 0x1012e055
test ecx, ecx
jbe 0x1012e0c8
sub ecx, dword [esi + 0x8628]
sbb eax, dword [esi + 0x862c]
mov dword [esi + 0x1b0], ecx
mov dword [esi + 0x1b4], eax
test eax, eax
jg 0x1012e0c8
jl 0x1012e077
test ecx, ecx
ja 0x1012e0c8
push 0
push 0xffffffffffffffff
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.10126b40
mov ecx, dword [esp + 0x3c]
add esp, 0x20
pop edi
pop esi
mov dword [ecx + 0xc], 2
pop ebp
mov dword [ebx + 0x398], 0
xor eax, eax
pop ebx
add esp, 8
ret
push str.Failed_to_read_data
push esi
call fcn.101274f0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1f
pop ebx
add esp, 8
ret
cmp dword [esi + 0x2a0], 0
mov ecx, str.APPE__s
jne 0x1012e0db
mov ecx, str.STOR__s
mov edx, dword [ebx + 0x370]
lea eax, [ebx + 0x328]
push edx
push ecx
push eax
call fcn.10135720
add esp, 0xc
test eax, eax
jne 0x1012e16f
pop edi
pop esi
pop ebp
mov dword [ebx + 0x398], 0x21
pop ebx
add esp, 8
ret
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 0xc], eax
je 0x1012e11f
pop edi
pop esi
pop ebp
mov dword [ebx + 0x398], eax
pop ebx
add esp, 8
ret
mov eax, dword [edi + 0x78]
mov ecx, dword [edi + 0x7c]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x1012e14f
push ecx
push eax
push esi
call fcn.101331b0
mov eax, dword [edi + 0x7c]
mov ecx, dword [edi + 0x78]
push eax
push ecx
push ebx
call fcn.1012c320
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov edx, dword [edi + 0x48]
push edx
push str.SIZE__s
push edi
call fcn.10135720
add esp, 0xc
test eax, eax
jne 0x1012e16f
mov dword [ebx + 0x398], 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret