Function at 0x40db16
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push edi
push 2
xor ebp, ebp
mov edi, ecx
push ebp
push ebx
call fcn.00410ce1
add esp, 0xc
test eax, eax
je 0x40db3e
mov eax, 0x80004005
jmp 0x40ddda
push esi
push ebx
call fcn.00410be6
mov esi, eax
pop ecx
test esi, esi
jle 0x40dc26
lea eax, [esi + 2]
push eax
call fcn.0040e81a
mov ecx, dword [edi + 0x1c]
push ecx
mov dword [edi + 0x1c], eax
call fcn.0040f6aa
pop ecx
pop ecx
cmp dword [edi + 0x1c], ebp
je 0x40ddb5
push ebp
push ebp
push ebx
call fcn.00410ce1
add esp, 0xc
test eax, eax
jne 0x40db92
push ebx
push esi
push 1
push dword [edi + 0x1c]
call fcn.004107aa
add esp, 0x10
cmp eax, esi
je 0x40db9c
mov eax, 0x80470003
jmp 0x40ddd9
mov eax, dword [edi + 0x1c]
xor ebx, ebx
mov byte [eax + esi + 1], bl
mov eax, dword [edi + 0x1c]
mov byte [esi + eax], bl
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x18], ecx
cmp esi, 3
jl 0x40dbcf
cmp byte [ecx], 0xef
jne 0x40dbcf
cmp byte [ecx + 1], 0xbb
jne 0x40dbcf
cmp byte [ecx + 2], 0xbf
jne 0x40dbcf
lea eax, [ecx + 3]
mov dword [esp + 0x18], eax
cmp esi, 2
jl 0x40dc4b
cmp byte [ecx], 0xff
jne 0x40dc4b
cmp byte [ecx + 1], 0xfe
jne 0x40dc4b
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
lea ebp, [ecx + 2]
push ebp
push ebx
push 0xfde9
call dword [0x42a020]
mov ebx, eax
test ebx, ebx
je 0x40dc26
push ebx
call fcn.0040e81a
pop ecx
push 0
push 0
push ebx
mov esi, eax
xor ebx, ebx
push esi
push 0xffffffffffffffff
push ebp
push ebx
push 0xfde9
call dword [0x42a020]
test eax, eax
jne 0x40dc30
push esi
call fcn.0040f6aa
pop ecx
mov eax, 0x80004005
jmp 0x40ddd9
mov eax, dword [edi + 0x1c]
push eax
mov dword [edi + 0x1c], esi
call fcn.0040f6aa
mov eax, dword [edi + 0x1c]
push ebx
mov dword [esp + 0x20], eax
call fcn.0040f6aa
pop ecx
pop ecx
mov esi, ebx
jmp 0x40dcb8
mov cl, byte [eax]
cmp cl, 0x23
je 0x40ddc3
cmp cl, 0x3b
je 0x40ddc3
mov edx, eax
mov ecx, 0x4312e8
call fcn.0040e752
mov ebx, eax
mov dword [esp + 0x10], ebx
mov al, byte [ebx]
test al, al
je 0x40ddc3
cmp al, 0x5b
jne 0x40dcc1
inc ebx
lea edx, [esp + 0x10]
mov esi, ebx
mov dword [esp + 0x10], ebx
mov ecx, 0x4312e0
mov dword [esp + 0x20], esi
call fcn.0040e77a
test eax, eax
je 0x40dcb6
lea edx, [esp + 0x10]
mov ecx, 0x4312e8
call fcn.0040e77a
test eax, eax
je 0x40ddc3
xor esi, esi
mov dword [esp + 0x20], esi
jmp 0x40ddc3
test esi, esi
je 0x40ddc3
lea edx, [esp + 0x10]
mov ecx, 0x430bac
call fcn.0040e77a
test eax, eax
je 0x40ddc3
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x40ddc3
lea eax, [esp + 0x14]
mov ecx, edi
push eax
push esi
call fcn.0040deba
test al, al
jne 0x40dd45
push 0xc
call fcn.004101ce
mov esi, eax
pop ecx
test esi, esi
je 0x40dd16
mov dword [esi], ebx
xor ebx, ebx
mov dword [esi + 4], ebp
mov dword [esi + 8], ebx
jmp 0x40dd1a
xor ebx, ebx
mov esi, ebx
mov dword [esp + 0x14], esi
test esi, esi
je 0x40ddb5
push ecx
push dword [esp + 0x24]
mov ecx, edi
call fcn.0040e479
test eax, eax
je 0x40dde3
push esi
lea ecx, [eax + 8]
call fcn.0040de7f
jmp 0x40ddbf
mov esi, dword [esp + 0x14]
jmp 0x40dd85
mov ecx, dword [esi]
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40dd6f
test dl, dl
je 0x40dd6b
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40dd6f
add eax, 2
add ecx, 2
test dl, dl
jne 0x40dd4f
xor eax, eax
jmp 0x40dd74
sbb eax, eax
or eax, 1
test eax, eax
je 0x40ddbc
mov eax, dword [esi + 8]
test eax, eax
je 0x40dd8b
mov esi, eax
mov dword [esp + 0x14], esi
test esi, esi
jne 0x40dd4b
jmp 0x40ddbf
push 0xc
call fcn.004101ce
pop ecx
test eax, eax
je 0x40dda3
mov dword [eax], ebx
xor ebx, ebx
mov dword [eax + 4], ebp
mov dword [eax + 8], ebx
jmp 0x40dda7
xor ebx, ebx
mov eax, ebx
push eax
lea ecx, [esi + 8]
call fcn.0040de7f
cmp dword [esi + 8], ebx
jne 0x40ddbf
mov eax, 0x8007000e
jmp 0x40ddd9
mov dword [esi + 4], ebp
mov esi, dword [esp + 0x20]
lea edx, [esp + 0x18]
mov ecx, 0x4312e4
call fcn.0040e77a
test eax, eax
jne 0x40dc4f
pop esi
pop edi
pop ebp
pop ebx
add esp, 0xc
ret 4
call 0x40da80
int3