Function at 0x10003680
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, dword [esp + 0x40]
mov ebx, dword [esi + 4]
mov ebp, dword [esi]
xor eax, eax
cmp byte [esp + 0x4c], 1
push edi
lea edi, [ebx + 0x470]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], edi
jne 0x100036ef
push eax
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
push ecx
push ebp
call fcn.1000ddaa
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x54]
add esp, 0xc
push edx
lea eax, [esp + 0x24]
push eax
push ecx
mov eax, esi
call fcn.10002e30
mov eax, dword [esp + 0x2c]
add esp, 0xc
jmp 0x100036f3
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov ecx, dword [edx]
push 0
add ecx, eax
push ecx
push ebp
call fcn.1000ddaa
add esp, 0xc
mov eax, ebp
call fcn.100019e0
movzx eax, ax
movsx eax, ax
test eax, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x3c], eax
jle 0x10003e09
push ebp
mov esi, 1
push esi
lea edx, [esp + 0x28]
push 2
push edx
mov dword [esp + 0x30], 0
call fcn.1000e456
mov ax, word [0x1002b4d8]
add esp, 0x10
cmp ax, si
jne 0x1000375b
cmp word [0x1002b4dc], 0
jmp 0x10003767
test ax, ax
jne 0x1000377a
cmp word [0x1002b4dc], si
jne 0x1000377a
mov eax, dword [esp + 0x20]
movzx cx, ah
mov ch, al
movzx edx, cx
mov dword [esp + 0x20], edx
push ebp
push esi
lea eax, [esp + 0x24]
push 2
push eax
call fcn.1000e456
mov ax, word [0x1002b4d8]
add esp, 0x10
cmp ax, si
jne 0x100037a0
cmp word [0x1002b4dc], 0
jmp 0x100037ac
test ax, ax
jne 0x100037bf
cmp word [0x1002b4dc], si
jne 0x100037bf
mov eax, dword [esp + 0x1c]
movzx cx, ah
mov ch, al
movzx edx, cx
mov dword [esp + 0x1c], edx
push ebp
push esi
lea eax, [esp + 0x20]
push 4
push eax
call fcn.1000e456
mov ax, word [0x1002b4d8]
add esp, 0x10
cmp ax, si
jne 0x10003810
cmp word [0x1002b4dc], 0
jne 0x10003849
mov eax, dword [esp + 0x18]
xor edx, edx
mov dh, byte [esp + 0x1a]
mov ecx, eax
shr ecx, 0x18
or ecx, edx
mov edx, eax
and edx, 0xff00
shl edx, 8
or ecx, edx
shl eax, 0x18
or eax, ecx
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x1000384d
test ax, ax
jne 0x10003849
cmp word [0x1002b4dc], si
jne 0x10003849
mov eax, dword [esp + 0x18]
xor edx, edx
mov dh, byte [esp + 0x1a]
mov ecx, eax
shr ecx, 0x18
or ecx, edx
mov edx, eax
and edx, 0xff00
shl edx, 8
or ecx, edx
shl eax, 0x18
or eax, ecx
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x1000384d
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
push edi
mov ecx, esi
call fcn.10001a50
movzx ebx, ax
add esp, 4
cmp bx, 0xffff
mov dword [esp + 0x38], ebx
je 0x10003e4f
cmp bx, 1
jne 0x100038a9
mov eax, ebp
lea esi, [esp + 0x24]
call fcn.10002990
push ebp
call fcn.1000dcb5
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
add ecx, dword [esp + 0x28]
add esp, 4
push 0
push ecx
push ebp
call fcn.1000ddaa
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
add esp, 0xc
movzx eax, word [esp + 0x20]
cmp eax, 0xa001
jg 0x10003b53
je 0x10003b19
cmp eax, 0x9201
jg 0x100039ac
je 0x1000398c
cmp eax, 0x9000
jg 0x1000394c
je 0x10003934
sub eax, 0x829a
je 0x1000391e
sub eax, 3
je 0x10003908
sub eax, 0x58a
jne case.0x10003cb1.41995
mov edi, dword [esp + 0x14]
push ebp
call fcn.10001e50
add esp, 4
mov dword [edi], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
mov ebx, ebp
call fcn.100020d0
mov dword [edi], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
mov ebx, ebp
call fcn.10001c80
mov dword [edi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
push ebp
call fcn.10002830
add esp, 4
mov dword [esi], 1
jmp 0x10003dd4
sub eax, 0x9003
je 0x10003974
sub eax, 1
jne case.0x10003cb1.41995
mov esi, dword [esp + 0x14]
mov ebx, ebp
call fcn.10001bf0
mov edx, esi
mov dword [edx], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
mov ebx, ebp
call fcn.10001ba0
mov eax, esi
mov dword [eax], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
lea eax, [edi + 0x2a4]
push eax
mov esi, ebp
call fcn.10002120
add esp, 4
mov dword [edi], 1
jmp 0x10003dd4
sub eax, 0x9202
cmp eax, 0x7a
ja case.0x10003cb1.41995
movzx ecx, byte [eax + 0x10003efc]
jmp dword [ecx*4 + 0x10003ecc]
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10002230
mov dword [esi], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
lea eax, [edi + 0x2a4]
push eax
mov esi, ebp
call fcn.10002270
add esp, 4
mov dword [edi], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
push edi
mov esi, ebp
call fcn.10001fb0
add esp, 4
mov dword [edi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10002390
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.100023e0
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001f70
mov dword [esi], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
push ebp
call fcn.10002430
add esp, 4
mov dword [edi], 1
jmp 0x10003dd4
mov edi, dword [esp + 0x14]
push ebp
call fcn.10001f20
add esp, 4
mov dword [edi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10002480
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
mov ebx, edi
push ebp
lea edi, [esi + 0x2a4]
call fcn.100024d0
add esp, 4
mov dword [esi], 1
jmp 0x10003dd4
test bx, bx
jne 0x10003aec
push 1
push 4
jmp 0x10003de3
cmp byte [esp + 0x50], 0
jne case.0x10003cb1.41995
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx]
mov esi, dword [esp + 0x44]
lea edx, [esp + 0x18]
push edx
push 0
push eax
xor dl, dl
call fcn.10003fb0
jmp 0x10003dd1
mov eax, ebp
lea esi, [esp + 0x20]
mov dword [esp + 0x20], 0
call fcn.100028b0
push 1
push 2
push ebp
call fcn.1000ddaa
add esp, 0xc
cmp word [esp + 0x20], 0xffff
jne 0x10003dd4
mov dword [esp + 0x34], 1
jmp 0x10003dd4
cmp eax, 0xa401
jg 0x10003ca3
je 0x10003c5d
cmp eax, 0xa20e
jg 0x10003bf4
je 0x10003bd8
sub eax, 0xa002
je 0x10003bbe
sub eax, 1
je 0x10003ba4
sub eax, 0x208
jne case.0x10003cb1.41995
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.100025c0
mov dword [esi], 1
jmp 0x10003dd4
mov ebx, dword [esp + 0x14]
push esi
mov edi, ebp
call fcn.100027d0
add esp, 4
mov dword [ebx], 1
jmp 0x10003dd4
mov ebx, dword [esp + 0x14]
push esi
mov edi, ebp
call fcn.10002770
add esp, 4
mov dword [ebx], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10002610
mov dword [esi], 1
jmp 0x10003dd4
sub eax, 0xa20f
je 0x10003c41
sub eax, 1
je 0x10003c25
sub eax, 4
jne case.0x10003cb1.41995
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.100026f0
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.100026b0
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10002660
mov dword [esi], 1
jmp 0x10003dd4
mov eax, ebp
lea esi, [esp + 0x20]
mov dword [esp + 0x20], 0
call fcn.100028b0
push 1
push 2
push ebp
call fcn.1000ddaa
mov eax, dword [esp + 0x20]
mov dx, word [esp + 0x2c]
mov word [eax + 0x2a8], dx
mov byte [eax + 0x2a6], 1
mov byte [eax + 0x2a4], 1
mov dword [eax], 1
jmp 0x10003dd1
sub eax, 0xa402
cmp eax, 0xa
ja case.0x10003cb1.41995
jmp dword [eax*4 + 0x10003f78]
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001cd0
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001d10
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001ea0
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10002730
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001c40
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001e10
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001d50
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001d90
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001dd0
mov dword [esi], 1
jmp 0x10003dd4
mov esi, dword [esp + 0x14]
lea edi, [esi + 0x2a4]
mov ebx, ebp
call fcn.10001ee0
mov dword [esi], 1
jmp 0x10003dd4
cmp bx, 1
je 0x10003ddc
push 1
push 4
push ebp
call fcn.1000ddaa
add esp, 0xc
cmp word [esp + 0x38], 1
jne 0x10003dec
mov eax, dword [esp + 0x28]
push 0
push eax
push ebp
call fcn.1000ddaa
add esp, 0xc
mov eax, dword [esp + 0x2c]
add eax, 1
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
jl 0x10003728
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x30]
lea eax, [ebx + 4]
push eax
call fcn.1000d413
add esp, 4
cmp eax, 0xdd
jl 0x10003eb4
cmp dword [esp + 0x34], 1
jne 0x10003eb4
mov eax, edi
mov byte [edi + 1], 0
mov byte [edi + 4], 0
mov byte [edi], 0
call fcn.10004d00
mov dword [ebx], 1
mov ax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov esi, dword [esp + 0x14]
push 0x298
lea ecx, [esi + 0xc]
push 0
push ecx
mov dword [esi], 0
mov byte [esi + 4], 0
call fcn.1000c0b0
add esp, 0xc
push 0xf8
lea eax, [esi + 0x2a4]
push 0
push eax
call fcn.1000c0b0
mov edx, dword [esp + 0x3c]
add esp, 0xc
mov byte [edx], 0
push 0x4c
mov word [esi + 0x471], 0
push 0
add esi, 0x474
push esi
call fcn.1000c0b0
add esp, 0xc
xor ax, ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov byte [edi + 1], 0
mov byte [edi + 4], 0
mov byte [edi], 0
pop edi
pop esi
pop ebp
mov ax, 1
pop ebx
add esp, 0x30
ret