Function at 0x10046950
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x204]
sub esp, 0x204
push 0xffffffffffffffff
push 0x1017914b
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x101cc114]
xor eax, ebp
mov dword [ebp + 0x200], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0x20c]
mov eax, dword [ebp + 0x210]
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0x214]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x18], edx
xor ebx, ebx
mov dword [ebp - 0x28], ebx
push eax
pop eax
mov byte [ebp], bl
push 0x1ff
push ebx
lea eax, [ebp + 1]
push eax
call fcn.101183f0
add esp, 0xc
push ebx
pop ebx
mov dword [ebp - 0x2c], ebx
mov esi, esi
mov eax, dword [esi + 0x32d4]
cmp dword [eax + 0x14], ebx
jbe 0x10046aaf
cmp dword [eax + 0x18], 0x10
jb 0x100469e4
mov eax, dword [eax + 4]
jmp 0x100469e7
add eax, 4
push eax
lea ecx, [ebp]
push ecx
push esi
call fcn.10057f00
add esp, 0xc
push edx
pop edx
push 0x10181780
push edi
call fcn.10118100
add esp, 8
test eax, eax
jne 0x10046aaf
mov byte [ebp - 0x14], 0x72
mov byte [ebp - 0x13], 0x62
mov byte [ebp - 0x12], bl
mov bh, bh
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp]
push eax
call fcn.101191bd
add esp, 8
mov ebx, eax
mov eax, eax
test ebx, ebx
je 0x10046aaf
push 2
push 0
push ebx
call fcn.10119074
add esp, 0xc
mov dh, dh
push ebx
call fcn.10118f7f
add esp, 4
mov dword [ebp - 0x1c], eax
mov dh, dh
add eax, 1
push eax
call fcn.10117399
add esp, 4
mov edi, eax
mov dword [ebp - 0x2c], edi
mov edx, edx
test edi, edi
jne 0x10046a78
push ebx
call fcn.10118ab4
add esp, 4
mov bh, bh
xor eax, eax
jmp 0x10046c76
push 0
push 0
push ebx
call fcn.10119074
add esp, 0xc
push ebx
pop ebx
push ebx
mov ecx, dword [ebp - 0x1c]
push ecx
push 1
push edi
call fcn.10118dcc
add esp, 0x10
push ebx
pop ebx
mov edx, dword [ebp - 0x1c]
mov byte [edx + edi], 0
push ecx
pop ecx
push ebx
call fcn.10118ab4
add esp, 4
mov dl, dl
mov bl, bl
push 0x1000000
call fcn.10117399
add esp, 4
mov ebx, eax
mov dword [ebp - 0x1c], ebx
mov eax, eax
test ebx, ebx
jne 0x10046adc
mov eax, dword [ebp - 0x2c]
push eax
call fcn.1011745c
add esp, 4
mov ebx, ebx
xor eax, eax
jmp 0x10046c76
mov byte [ebx], 0
mov edx, edx
mov ecx, ecx
mov dword [ebp - 4], 0
cmp dword [esi + 0x32c4], 0
jne 0x10046b43
push 0x1000000
mov ecx, dword [ebp + 0x220]
mov edx, dword [ebp + 0x21c]
mov eax, dword [ebp + 0x218]
push ebx
push ecx
push edx
mov ecx, dword [ebp - 0x18]
push eax
mov edx, dword [ebp - 0x30]
push ecx
mov eax, dword [ebp - 0x24]
push edx
push edi
push eax
push esi
cmp dword [ebp + 0x224], 0
je 0x10046b34
call fcn.10050510
add esp, 0x28
mov dword [ebp - 0x20], eax
mov al, al
jmp 0x10046b79
call fcn.1004b230
add esp, 0x28
mov dword [ebp - 0x20], eax
mov eax, eax
jmp 0x10046b79
mov ecx, dword [ebp + 0x224]
push ecx
push ebx
mov edx, dword [ebp + 0x220]
push edx
mov eax, dword [ebp + 0x21c]
push eax
mov ecx, dword [ebp + 0x218]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push edi
push esi
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
call fcn.10044430
add esp, 0x20
mov dword [ebp - 0x20], eax
mov cl, cl
or esi, 0xffffffff
mov dword [ebp - 4], esi
cmp eax, 1
jne 0x10046c5a
lea eax, [ebp]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10046b90
sub eax, edx
je 0x10046c0d
mov byte [ebp - 0x18], 0x77
mov byte [ebp - 0x17], 0x62
mov byte [ebp - 0x16], cl
mov ebp, ebp
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp]
push ecx
call fcn.101191bd
add esp, 8
mov esi, eax
mov eax, eax
test esi, esi
je 0x10046c5a
mov eax, ebx
lea edx, [eax + 1]
jmp 0x10046bd0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10046bd0
sub eax, edx
push esi
push 1
push eax
push ebx
call fcn.1011b438
add esp, 0x10
mov al, al
push esi
call fcn.10118ab4
add esp, 4
push edx
pop edx
jmp 0x10046c5a
push 0x1c
call fcn.1010956d
add esp, 4
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x10046c39
mov dword [eax + 0x18], 0xf
mov dword [eax + 0x14], 0
mov byte [eax + 4], 0
jmp 0x10046c3b
xor eax, eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x28], eax
mov dh, dh
test eax, eax
je 0x10046a71
push ebx
mov ecx, eax
call fcn.1000d5c0
mov dh, dh
jmp 0x10046c5a
push ebx
call fcn.1011745c
add esp, 4
mov dl, dl
mov edx, dword [ebp - 0x2c]
push edx
call fcn.1011745c
add esp, 4
xchg ebx, eax
xchg ebx, eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x200]
xor ecx, ebp
call fcn.10117937
add ebp, 0x204
mov esp, ebp
pop ebp
ret